import request from './index'

//获取所有车辆信息
export interface getAllCarAns {
    code: number;
    msg: string;
    data: Array<any>
}
export const getAllCar = () => {
    return request({
        url: '/cars/all',
        method: 'get'
    })
}

//根据生产商id获取车辆信息
export interface getSiteCarAns {
    code: number;
    msg: string;
    data: Array<any>
}
export const getSiteCar = (venderId: number) => {
    return request({
        url: '/cars/site',
        method: 'get',
        params: {
            venderId
        }
    })
}

export interface getOneCarAns {
    code: number;
    msg: string;
    data: object | null
}
export const getOneCar = (carId: string) => {
    return request({
        url: '/cars/getOneCar',
        method: 'get',
        params: {
            carId
        }
    })
}